import { Assistant, File, LiveStream } from "../LiveRoom";
import { SignInOption } from "../request/roomReq";

export type GetRoomRsp = {
  roomId: string;
  roomName: string;
  description: string;
  owner: string;
  ownerName: string;
  ownerLogo: string;
  anchor: string;
  anchorName: string;
  anchorLogo: string;
  orgId: string;
  orgName: string;
  orgLogo: string;
  tips: string;
  picUrl: string;
  preLoadVideo: string;
  pauseVideo: string;
  passwd: string;
  direction: boolean;
  type: number;
  status: number;
  muteStatus: number;
  startTime: string;
  endTime: string;
  createTime: string;
  forceSignIn: boolean;
  signInOptions: SignInOption[],
  allowShare: boolean;
  liveStreams: LiveStream[];
  linkStreams: LiveStream[];
  files: File[];
  duration: number;
  visits: number;
  likes: number;
  shares: number;
};

export type EtcDataRsp = {
  duration: number; //直播或回放时长
  visits: number; //访问人次
  shares: number; //分享数
  likes: number; //点赞数
  serverTime: number; //服务器当前时间，用于客户端服务端时间同步
};
//观看历史字段
export type RoomItem = {
  roomId: string;
  roomName: string;
  anchorName: string;
  ownerName: string;
  orgName: string;
  startTime: Date;
  status: number;
  type: number;
  picUrl: string;
};

export type GetInvitesRsp = {
  anchor: {
    userId: string; //主播id
    realName: string; //主播真实姓名
    avatar: string; //主播头像
    phone: string; //邀请主播的电话
  };
  assistants: Assistant[]; //助手列表
};

//首页字段
export type LiveContent = {
  roomId: string;
  roomName: string;
  anchorName: string;
  ownerName: string;
  orgName: string;
  startTime: Date;
  status: number;
  type: number;
  picUrl: string;
};

export type HomePageListRsp = {
  firstFloor: LiveContent[];
  secondFloor: LiveContent[];
  thirdFloor: any;
};

export type ShareListRsp = {
  nick: string;  //用户昵称
  avatar: string;   //用户头像
  count: string;  //分享次数
};
 
// 连麦列表
export type AudienceItem = {
  userId: string;
  nickName: string;
  avatar: string;
  inviteStatus?: number;
}

export type GetStorage = {
  roomId: string;
  signIned?: boolean;
  pwded?: boolean;
}

//文件转码成功通知
export type FileTransCodeRsp = {
  id: string; //文件Id
  transcodeUrl: string; //转码文件地址
  pages: number; //总页数
};
